<!DOCTYPE html>
<!--
     SPDX-License-Identifier: CC-BY-SA-4.0
     SPDX-FileCopyrightText: 2020 seL4 Project a Series of LF Projects, LLC.
-->
<!-- Page last generated 2025-02-20 03:16:15 +0000 -->
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Microchip PolarFire Icicle Kit | seL4 docs</title>

    <!-- Our stylesheet and theme stylesheet.  Contains bootstrap. -->
    <link rel="stylesheet" href="/assets/css/style.css" type="text/css">
    <!-- Font awesome -->
    <link href="https://use.fontawesome.com/releases/v5.0.8/css/all.css" rel="stylesheet">
    <link href="https://fonts.googleapis.com/css2?family=Roboto&display=swap" rel="stylesheet">
    <!-- Pygments syntax highlighting  -->
    <link rel="stylesheet" href="/assets/css/highlighting/trac.css" type="text/css">
    <link rel="icon" type="image/x-icon" href="/assets/favicon.ico"><script defer data-domain="docs.sel4.systems"
	    src="https://analytics.sel4.systems/js/script.js"></script></head>

  <body class="container-fluid">

    



<header>
  <ul class="row menu">
    <li class="col-xs-12 col-md-2" >
            <a href="https://sel4.systems" class="skip-icon">
              <img class="img-responsive" src="/assets/logo-text-white.svg" alt="seL4 logo" />
            </a>
    </li>
    <li class="col-xs-12 col-md-10 menu">
      <nav aria-label="Banner links">
        <h2><a href="/Resources" />Resources</h2>
        <h2><a href="/processes" />Contributing</a></h2>
        <h2><a href="/projects" />Projects</h2>
        <h2><a href="/Tutorials" />Tutorials</h2>
        <iframe title="DuckDuckGo search bar" src="https://duckduckgo.com/search.html?site=docs.sel4.systems&prefill=Search%20sel4.systems" style="overflow:hidden;margin-bottom:10px; padding:0;height:40px;float:right;border-width: 0px"></iframe>
      </nav>
    </li>
  </ul>
  <div class="clear"></div>
  
<div class="breadcrumbs bootstrap hidden-sm-down">
  <nav class="sel-breadcrumb" aria-label="Breadcrumb" >
    <ol class=" list-unstyled" vocab="http://schema.org/" typeof="BreadcrumbList">
      
      
        

        

        <li class="breadcrumb-item" property="itemListElement" typeof="ListItem">
            <a property="item" typeof="WebPage" href="/">
              <span property="name"><b>seL4 Docs</b></span>
            </a>
            <meta property="position" content="1" />
        </li>
      
        

        

        <li class="breadcrumb-item" property="itemListElement" typeof="ListItem">
            <a property="item" typeof="WebPage" href="/Hardware/">
              <span property="name"><b>Supported platforms</b></span>
            </a>
            <meta property="position" content="2" />
        </li>
      
        

        
          <li class="breadcrumb-item" property="itemListElement" typeof="ListItem">
            <span property="name">Microchip PolarFire Icicle Kit</span>
            <meta property="position" content="3" /></li>
          
    </ol>
  </nav>
  <nav class="sel-version" aria-label="Current Versions">
    <ol class="list-unstyled">
      <li class="list-unstyled text-right" style="margin-left:auto; padding:0rem 0rem;">
        Current versions:</li>
      <li class="list-unstyled text-right">
      <a href="/releases/sel4/13.0.0"><b>seL4-13.0.0</b></a></li>
      <li class="list-unstyled text-right">
      <a href="/releases/microkit/1.4.1"><b>microkit-1.4.1</b></a></li>
      <li class="list-unstyled text-right">
      <a href="/releases/camkes/camkes-3.11.0"><b>camkes-3.11.0</b></a></li>
      <li class="list-unstyled text-right">
      <a href="/releases/capdl/0.3.0"><b>capDL-0.3.0</b></a></li>
      </ol>
  </nav>
  <div class='clear'></div>
</div>


</header>

    <main>
      <div class="row">
  <div class="hidden-xs col-sm-4 col-md-3 col-lg-2">
    


<div class="sidebar">
















</div>

  </div>
  <div class="col-sm-8 col-md-9 col-lg-8 main">
    
    <div class="content">
      <h1 id="microchip-polarfire-icicle-kit">Microchip PolarFire Icicle Kit</h1>

<p>Polarfire Icicle Kit is a RISC-V development board by Microchip. Check
<a href="https://www.microchip.com/en-us/development-tool/MPFS-ICICLE-KIT-ES">here</a> for details.</p>

<p>Microchip maintains online material, including designs and documentation
<a href="https://www.microchip.com/en-us/products/fpgas-and-plds/system-on-chip-fpgas/polarfire-soc-fpgas#documentation">here</a>.</p>

<p>Additional documentation and resources can be found on the polarfire-soc github
<a href="https://github.com/polarfire-soc/">here</a>.</p>

<h2 id="building">Building</h2>
<h3 id="sel4test">seL4test</h3>

<p>Checkout the sel4test project using repo as per <a href="/seL4Test">seL4Test</a></p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>repo init <span class="nt">-u</span> https://github.com/seL4/sel4test-manifest.git
repo <span class="nb">sync
mkdir </span>cbuild
<span class="nb">cd </span>cbuild
../init-build.sh <span class="nt">-DPLATFORM</span><span class="o">=</span>polarfire <span class="nt">-DSel4testAllowSettingsOverride</span><span class="o">=</span>True <span class="nt">-DElfloaderImage</span><span class="o">=</span>binary <span class="nt">-DKernelVerificationBuild</span><span class="o">=</span>OFF
<span class="c"># The default cmake wrapper sets up a default configuration for the target platform.</span>
<span class="c"># To change individual settings, run `ccmake` and change the configuration</span>
<span class="c"># parameters to suit your needs.</span>
ninja

</code></pre></div></div>

<p>Generated binaries can be found in the <code class="language-plaintext highlighter-rouge">images/</code> directory.</p>

<p>Converting to a u-boot uImage:</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>mkimage <span class="nt">-A</span> riscv <span class="nt">-O</span> linux <span class="nt">-T</span> kernel <span class="nt">-C</span> none <span class="nt">-a</span> 0x80000000 <span class="nt">-e</span> 0x80000000 <span class="nt">-n</span> sel4test <span class="nt">-d</span> <span class="se">\</span>
images/sel4test-driver-image-riscv-polarfire images/seL4-uImage
<span class="nb">cp </span>kernel/kernel.dtb images/
</code></pre></div></div>

<h3 id="hart-software-services">Hart Software Services</h3>

<p>Install the SoftConsole software development environment from Microchip
<a href="https://www.microchip.com/en-us/products/fpgas-and-plds/fpga-and-soc-design-tools/soc-fpga/softconsole">here</a>.
The following instructions are based on SoftConsole v2022.2</p>

<ol>
  <li>Clone the Hart Software Services
    <div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>git clone https://github.com/polarfire-soc/hart-software-services
</code></pre></div>    </div>
  </li>
  <li>
    <p>Open SoftConsole and import a project from the newly cloned <code class="language-plaintext highlighter-rouge">hart-software-services</code> repo.</p>
  </li>
  <li>Build the project with the project defaults.</li>
</ol>

<h3 id="hss-payload-generator">hss-payload-generator</h3>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>git clone https://github.com/polarfire-soc/hart-software-services
<span class="nb">cd </span>hart-software-services/tools/hss-payload-generator
make
</code></pre></div></div>

<p>This generates a <code class="language-plaintext highlighter-rouge">hss-payload-generator</code> ELF.</p>

<h3 id="u-boot">U-Boot</h3>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>git clone https://github.com/polarfire-soc/u-boot
<span class="nb">cd </span>u-boot
<span class="nv">CROSS_COMPILE</span><span class="o">=</span>riscv64-linux-gnu- <span class="nv">ARCH</span><span class="o">=</span>riscv make microchip_mpfs_icicle_defconfig
<span class="nv">CROSS_COMPILE</span><span class="o">=</span>riscv64-linux-gnu- <span class="nv">ARCH</span><span class="o">=</span>riscv make
</code></pre></div></div>

<p>This generates a <code class="language-plaintext highlighter-rouge">u-boot-dtb.bin</code> binary.</p>

<p>In order boot u-boot from the HSS, the <code class="language-plaintext highlighter-rouge">u-boot-dtb.bin</code> needs to be packaged as an HSS payload using
the hss-payload-generator tool but first a payload configuration yaml file needs to be created:</p>

<div class="language-yaml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c1">#</span>
<span class="c1"># HSS Payload Generator - U-Boot Payload</span>
<span class="c1">#</span>

<span class="na">set-name</span><span class="pi">:</span> <span class="s1">'</span><span class="s">PolarFire-SoC-HSS::U-Boot'</span>

<span class="na">hart-entry-points</span><span class="pi">:</span> <span class="pi">{</span><span class="nv">u54_1</span><span class="pi">:</span> <span class="s1">'</span><span class="s">0x1000200000'</span><span class="pi">,</span> <span class="nv">u54_2</span><span class="pi">:</span> <span class="s1">'</span><span class="s">0x1000200000'</span><span class="pi">,</span> <span class="nv">u54_3</span><span class="pi">:</span> <span class="s1">'</span><span class="s">0x1000200000'</span><span class="pi">,</span> <span class="nv">u54_4</span><span class="pi">:</span> <span class="s1">'</span><span class="s">0x1000200000'</span><span class="pi">}</span>

<span class="na">payloads</span><span class="pi">:</span>
  <span class="na">u-boot.bin</span><span class="pi">:</span> <span class="pi">{</span><span class="nv">exec-addr</span><span class="pi">:</span> <span class="s1">'</span><span class="s">0x1000200000'</span><span class="pi">,</span> <span class="nv">owner-hart</span><span class="pi">:</span> <span class="nv">u54_1</span><span class="pi">,</span> <span class="nv">secondary-hart</span><span class="pi">:</span> <span class="nv">u54_2</span><span class="pi">,</span> <span class="nv">secondary-hart</span><span class="pi">:</span> <span class="nv">u54_3</span><span class="pi">,</span> <span class="nv">secondary-hart</span><span class="pi">:</span> <span class="nv">u54_4</span><span class="pi">,</span> <span class="nv">priv-mode</span><span class="pi">:</span> <span class="nv">prv_s</span> <span class="pi">}</span>

</code></pre></div></div>

<p>The payload can then be generated using this yaml file.</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>./hss-payload-generator <span class="nt">-c</span> u-boot.yaml uboot-payload.bin
</code></pre></div></div>

<p>This generates a <code class="language-plaintext highlighter-rouge">uboot-payload.bin</code> binary.</p>

<h2 id="booting-via-sd-card">Booting via SD card</h2>

<p>Prepare the SD card</p>
<div class="language-sh highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">sudo </span>sgdisk <span class="nt">-Zo</span> <span class="nt">--new</span><span class="o">=</span>1:2048:2099199 <span class="nt">--typecode</span><span class="o">=</span>1:0700 <span class="se">\</span>
     <span class="nt">--new</span><span class="o">=</span>2:2099200:4196351 <span class="nt">--typecode</span><span class="o">=</span>2:EF02 /dev/sdX
<span class="nb">sudo dd </span><span class="k">if</span><span class="o">=</span>images/uboot-payload.bin <span class="nv">of</span><span class="o">=</span>/dev/sdX2
<span class="nb">sudo </span>mkfs.vfat <span class="nt">-F16</span> /dev/sdX1
<span class="nb">sudo </span>mount /dev/sdX1 /mnt
<span class="nb">sudo cp </span>images/seL4-uImage /mnt
<span class="nb">sudo cp </span>images/kernel.dtb /mnt
</code></pre></div></div>

<p>Insert the SD card into the Icicle Kit then power on the board, and drop into the u-boot
prompt. When you’re at the prompt, type the following:</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>fatload mmc 0 0x1000200000 seL4-uImage
fatload mmc 0 0x1020200000 kernel.dtb
bootm 0x1000200000 - 0x1020200000
</code></pre></div></div>

    </div>
  </div>
</div>

    </main>
    


<footer class="site-footer">

  <h2 class="footer-heading">seL4 docs</h2>

  <div class="footer-col-wrapper">

    <div class="col-md-2">
      



<ul class="social-media-list">
  <li><a href="https://github.com/sel4"><i class="fab fa-github"></i> <span class="username">sel4</span></a></li><li><a href="https://github.com/sel4proj"><i class="fab fa-github"></i> <span class="username">sel4proj</span></a></li>
</ul>

    </div>

    <div class="col-md-8">
      <ul class="list-unstyled">
        <li>
          This site is for displaying seL4 related documentation.  Pull requests are welcome.
        </li>
        
          <li>
            Site last updated: Fri Feb 7 10:17:38 2025 +1100 ee78c8857c
          </li>
          <li>
                Page last updated: Sun Nov 6 18:33:54 2022 +1100 a46c148f47
          </li>
        
      </ul>
    </div>
    <div class="col-md-2">
<a href="https://github.com/seL4/docs/blob/master/Hardware/polarfire.md">View page on GitHub</a>
      <br />
      <a href="https://github.com/seL4/docs/edit/master/Hardware/polarfire.md">Edit page on GitHub</a>
      <br />
      <a href="/sitemap">Sitemap</a>
    </div>

  </div>

</footer>

  </body>
</html>
